import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/dashboard',
      name: 'dashboard',
      component: resolve => require(['@/bind/index'], resolve),
      meta: {
        title: '用户绑定'
      }
    },
    {
      path: '/',
      name: 'bind',
      component: resolve => require(['@/bind/index'], resolve),
      meta: {
        title: '绑定'
      }
    },
    {
      path: '/logout',
      name: 'logout',
      component: resolve => require(['@/bind/components/logout'], resolve),
      meta: {
        title: '注销'
      }
    },
    {
      path: '/loginError',
      name: 'loginError',
      component: resolve => require(['@/bind/loginError'], resolve),
      meta: {
        title: '请先绑定'
      }
    },
    {
      path: '/noGrant',
      name: 'noGrant',
      component: resolve => require(['@/public/noGrant'], resolve),
      meta: {
        title: '暂无权限'
      }
    },
    {
      path: '/userManage',
      name: 'userManage',
      component: resolve => require(['@/bind/userManage'], resolve),
      meta: {
        title: '用户管理'
      }
    },
    {
      path: '/addUser',
      name: 'addUser',
      component: resolve => require(['@/bind/addUser'], resolve),
      meta: {
        title: '新增用户'
      }
    },
    {
      path: '/frame',
      name: 'frame',
      component: resolve => require(['@/frame/index'], resolve),
      meta: {
        title: '架构'
      }
    },
    {
      path: '/projectFrame',
      name: 'projectFrame',
      component: resolve => require(['@/frame/projectFrame'], resolve),
      meta: {
        title: '项目架构'
      }
    },
    {
      path: '/check',
      name: 'check',
      component: resolve => require(['@/check/index'], resolve),
      meta: {
        title: '审核'
      }
    },
    {
      path: '/checkProject',
      name: 'checkProject',
      component: resolve => require(['@/check/checkProject'], resolve),
      meta: {
        title: '安排项目'
      }
    },
    {
      path: '/checkTask',
      name: 'checkTask',
      component: resolve => require(['@/check/checkTask'], resolve),
      meta: {
        title: '安排课题'
      }
    },
    {
      path: '/checkProjectDetail',
      name: 'checkProjectDetail',
      component: resolve => require(['@/check/components/projectDetail'], resolve),
      meta: {
        title: '项目详情'
      }
    },
    {
      path: '/checkProjectTask',
      name: 'checkProjectTask',
      component: resolve => require(['@/check/components/checkProjectTask'], resolve),
      meta: {
        title: '安排课题'
      }
    },
    {
      path: '/checkGainDetail',
      name: 'checkGainDetail',
      component: resolve => require(['@/check/components/PRHeaderComponents/gainDetail'], resolve),
      meta: {
        title: '成果详情'
      }
    },
    {
      path: '/checkTaskDetail',
      name: 'checkTaskDetail',
      component: resolve => require(['@/check/components/PRHeaderComponents/taskDetail'], resolve),
      meta: {
        title: '课题详情'
      }
    },
    {
      path: '/newProject',
      name: 'newProject',
      component: resolve => require(['@/project/newProject'], resolve),
      meta: {
        title: '新建项目'
      }
    },
    {
      path: '/noProject',
      name: 'noProject',
      component: resolve => require(['@/project/components/noProject'], resolve),
      meta: {
        title: '项目'
      }
    },
    {
      path: '/project',
      name: 'project',
      component: resolve => require(['@/project/index'], resolve),
      meta: {
        title: '项目'
      }
    },
    {
      path: '/projectEdit',
      name: 'projectEdit',
      component: resolve => require(['@/project/projectEdit'], resolve),
      meta: {
        title: '编辑项目'
      }
    },
    {
      path: '/projectDetail',
      name: 'projectDetail',
      component: resolve => require(['@/project/project'], resolve),
      meta: {
        title: '项目详情'
      }
    },
    {
      path: '/taskList',
      name: 'taskList',
      component: resolve => require(['@/task/index'], resolve),
      meta: {
        title: '课题列表'
      }
    },
    {
      path: '/task',
      name: 'task',
      component: resolve => require(['@/task/components/task'], resolve),
      meta: {
        title: '课题详情'
      }
    },
    {
      path: '/mission',
      name: 'mission',
      component: resolve => require(['@/mission/index'], resolve),
      meta: {
        title: '任务列表'
      }
    },
    {
      path: '/missionDetail',
      name: 'missionDetail',
      component: resolve => require(['@/mission/detail'], resolve),
      meta: {
        title: '任务详情'
      }
    },
    {
      path: '/gain',
      name: 'Gain',
      component: resolve => require(['@/mission/gain'], resolve),
      meta: {
        title: '成果'
      }
    },
    {
      path: '/pace',
      name: 'pace',
      component: resolve => require(['@/pace/index'], resolve),
      meta: {
        title: '进度 '
      }
    },
    {
      path: '/projectPace',
      name: 'projectPace',
      component: resolve => require(['@/pace/projectPace'], resolve),
      meta: {
        title: '项目进度'
      }
    },
    {
      path: '/missionPace',
      name: 'missionPace',
      component: resolve => require(['@/pace/project/mission'], resolve),
      meta: {
        title: '任务进度'
      }
    }
  ]
})
